package org.csmzxy.class2333.duotai2;

public class Example14 {
    public static void main(String[]args){
        Animal animal=new Dog();//向上转型
        animal.speak();
        //向下转型调用子类特有的方法和属性
        Dog dog =(Dog) animal;//向下转型
        dog.houseKeep();
        dog.speak();
    }
}
